package com.code.AZPlan.model.po;

import com.code.commons.model.po.BasePO;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Id;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * AZ计划个人入金流水(入金历史记录)PO及持久层对象
 *
 * @author tangyifei
 * @since 2019年12月31日14:34:55
 */
@ApiModel("AZ计划个人入金流水(入金历史记录)PO及持久层对象")
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@JsonIgnoreProperties(value = {"hibernateLazyInitializer", "handler"})
public class EntryMoneyFlow extends BasePO<String> {

    private static final long serialVersionUID = 1578836552995059214L;

    @ApiModelProperty(value = "主键", example = "1")
    @Id
    @Length(min = 1, max = 64)
    private String id;

    @ApiModelProperty(value = "用户主键", example = "1")
    @NotBlank(message = "用户主键不能为空")
    @Length(min = 1, max = 64)
    private String userId;

    @ApiModelProperty(value = "入金之前的币种类型（入金之前的币种，比如XWC兑换USDT，那么就是XWC）", example = "XWC")
    @NotBlank(message = "入金之前的币种类型不能为空")
    private String coinTypeBefore;

    @ApiModelProperty(value = "入金之后币种类型（入金之后的币种，比如XWC兑换USDT，那么就是USDT）", example = "USDT")
    @NotBlank(message = "入金之后的币种类型不能为空")
    private String coinTypeAfter;

    @ApiModelProperty(value = "入金通道1（1000USDT） 入金通道2（3000USDT） 入金通道3（5000USDT）", example = "1")
    @NotNull(message = "入金通道不能为空")
    private Integer entryMoneyChannel;

    @ApiModelProperty(value = "入金的金额", example = "1000USDT")
    @NotNull(message = "入金的金额不能为空")
    private BigDecimal amount;

    @ApiModelProperty(value = "xwc的入金金额", example = "25000XWC")
    @NotNull(message = "xwc的入金金额不能为空")
    private BigDecimal entryAmount;

    @ApiModelProperty(value = "备注", example = "1000USDT")
    private String remark;

    @ApiModelProperty(value = "确认状态 0未确认 1已确认", example = "1")
    private Integer status;

    @ApiModelProperty(value = "手机号", example = "150****0055")
    private String phone;

    @ApiModelProperty(value = "矿池大小", example = "1000")
    private BigDecimal orePool;

    @ApiModelProperty(value = "用户账号", example = "XXXXXX")
    private String userAccount;

    @ApiModelProperty(value = "价格", example = "0.149163")
    private String price;

    @ApiModelProperty(value = "入金时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Date entryTime;
}
